﻿@model FrogFoot.Areas.FFManager.Models.GriddingViewModel
@{
    ViewBag.Title = "Suburbs";
}

<h2>Suburbs</h2>

<div class="row">
    <div class="col-xs-12">
        <table id="locationsTable" class="table table-striped table-responsive">
            <thead>
                <tr>
                    <td><label>Name</label></td>
                    <td><label>Code</label></td>
                    <td><label>Residents</label></td>
                    <td><label>Active</label></td>
                    <td><label>Allow Order</label></td>
                </tr>
            </thead>
            <tbody id="tableBody">

                @foreach (var loc in Model.Locations)
                {
                    <tr data-id="@loc.LocationId">
                        <td>@Html.TextBoxFor(x => loc.Name, new { @class = "form-control name" })</td>
                        <td>@Html.TextBoxFor(x => loc.PrecinctCode, new { @class = "form-control code" })</td>
                        <td>@Html.TextBoxFor(x => loc.Residents, new { @class = "form-control residents", @type = "number", @style = "width: 90px;" })</td>
                        <td>@Html.CheckBoxFor(x => loc.IsActive, new { @class = "active" })</td>
                        <td>@Html.CheckBoxFor(x => loc.AllowOrder, new { @class = "allowOrder" })</td>
                    </tr>
                }
            </tbody>
        </table>
    </div>
</div>